<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="container">
        <h1>h1</h1>
        <p>pppp</p>
        <b>bbbbb</b>
        <p>pppp</p>
        <p>pppp</p>
    </div>

    <script>
        // ol.onclick = function (event) {
        //     if (event.target.id == 'child') {
        //         console.log("找到你了！");
        //     }
        // }
        container.onclick = function (event) {
            if (event.target.nodeName == 'P') {
                console.log("找到你了！");
            }
        }
    </script>
</body>

</html>